/*
 * Copyright  bocmbci
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { CordovaPlugin } from './CordovaPlugin';

export class PluginEntry{
  private service: string;
  private pluginClass: Function;
  private plugin: CordovaPlugin;
  private onload: boolean;

   constructor(service: string, pluginClass: Function, plugin?: CordovaPlugin, onload?: boolean) {
    this.service = service;
    this.pluginClass = pluginClass;
    this.plugin = plugin;
    this.onload = onload;
  }

  // Getter for service
  public getService(): string {
    return this.service;
  }

  // Setter for service
  public setService(value: string) {
    this.service = value;
  }

  // Getter for pluginClass
  public getPluginClass(): Function {
    return this.pluginClass;
  }

  // Setter for pluginClass
  public setPluginClass(value: Function) {
    this.pluginClass = value;
  }

  // Getter for plugin
  public getPlugin(): CordovaPlugin {
    return this.plugin;
  }

  // Setter for plugin
  public setPlugin(value: CordovaPlugin) {
    this.plugin = value;
  }

  // Getter for onload
  public isOnload(): boolean {
    return this.onload;
  }

  // Setter for onload
  public set setOnload(value: boolean) {
    this.onload = value;
  }
}